﻿using System;
using Autodesk.Revit.UI;

namespace YArchitech.HVAC
{
	public static class OperationFactory
	{
		public static ConnOperation GetConnectOperation(ConnSelectStyle connStyle, UIDocument uiDoc, bool connPointSel)
		{
			ConnOperation result = null;
			switch (connStyle)
			{
			case ConnSelectStyle.Elbow:
				result = new ElbowConnOperation(uiDoc, connPointSel);
				break;
			case ConnSelectStyle.Lateral:
				result = new LateralConnOperation(uiDoc, connPointSel);
				break;
			case ConnSelectStyle.Tee:
				result = new TeeConnOperation(uiDoc, connPointSel);
				break;
			case ConnSelectStyle.Cross:
				result = new CrossConnOperation(uiDoc, connPointSel);
				break;
			case ConnSelectStyle.Reduce:
				result = new ReduceConnOperation(uiDoc, connPointSel);
				break;
			case ConnSelectStyle.Round:
				result = new RoundConnOperation(uiDoc, connPointSel);
				break;
			case ConnSelectStyle.Back:
				result = new BackConnOperation(uiDoc, connPointSel);
				break;
			}
			return result;
		}
	}
}
